#ifndef SAMPLE1_H
#define SAMPLE1_H

#include "SampleBase.h"
#include <string>
#include "ImageParam.h"
#include "Types.h"
#include "Ray.h"
namespace RayTracer
{
	// HelloWorld
	class TriangleSample : public SampleBase
	{
	public:
		TriangleSample() = default;
		~TriangleSample() = default;

		void Init();
		void Render();
		void ImGui();
		void ShutDown();
	private:
		vec3 RayColor(const Ray& ray);
		void Reset();
	private:
		int curIndex;
		bool isGenerate;
		ImageParam mImageParam; // output image para
		// camera
		const float aspect_ratio = 8.0 / 5.0;
		float viewport_height;
		float viewport_width;
		float focal_length;

		// viewport
		vec3 origin = vec3(0, 0, 0);
		vec3 horizontal;
		vec3 vertical;
		vec3 lower_left_corner;

		// sky color
		vec3 upColor;
		vec3 downColor;
	};

} // namespace
#endif // !SAMPLE1_H
